package com.koron.order.defect.bean.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.order.common.bean.po.OrderDispatchWorker;
import com.koron.order.common.bean.po.OrderLocationPo;
import com.koron.order.common.bean.po.OrderWorkDeptPo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @ClassName DispatchVO
 * @description
 * @Author zhouj
 * @Date 2021/9/17 8:54
 */
@Data
public class DispatchVO {

    /*缺陷派工信息*/
    @ApiModelProperty(value = "缺陷派工表ID")
    private String defectDispatchId;

    @ApiModelProperty(value = "缺陷工单ID")
    private String defectId;

    @ApiModelProperty(value = "工作地点ID")
    private String location;

    @ApiModelProperty(value = "工作地点名称")
    private String locationName;

    @ApiModelProperty(value = "工单性质")
    private Integer nature;

    @ApiModelProperty(value = "预计开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date startTime;

    @ApiModelProperty(value = "预计结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date endTime;

    /*工单工作地点信息*/
    private List<OrderLocationPo> orderLocationList;
    /*工单派工信息*/

    @ApiModelProperty(value = "工单派工表ID")
    private String orderDispatchId;

    @ApiModelProperty(value = "工单类型:日常维护工单、检修维护工单、大修工单、实验工单、缺陷工单")
    private String orderType;

    @ApiModelProperty(value = "工单表ID")
    private String orderId;

    @ApiModelProperty(value = "是否外单位")
    private Integer isOut;

    @ApiModelProperty(value = "本单位责任人账号,选择是外单位，则为跟踪负责人；若选择不是外单位，则为负责人")
    private String leader;

    @ApiModelProperty(value = "本单位责任人名称")
    private String leaderName;

    @ApiModelProperty(value = "外单位负责人账号")
    private String outLeader;

    @ApiModelProperty(value = "外单位负责人名称")
    private String outLeaderName;

    @ApiModelProperty(value = "工作负责人单位ID")
    private String deptWork;

    @ApiModelProperty(value = "工作负责人单位名称")
    private String deptWorkName;

    @ApiModelProperty(value = "工作内容")
    private String context;

    @ApiModelProperty(value = "注意事项")
    private String attention;

    @ApiModelProperty(value = "工单派工作业单位列表")
    List<OrderWorkDeptPo> orderWorkDeptPoList;

    /*工单派工人员信息*/

    @ApiModelProperty(value = "工单派工人员列表")
    List<OrderDispatchWorker> orderDispatchWorkerList;

    /*工单派工人员信息*/
    @ApiModelProperty(value = "是否提交")
    private Boolean isCommit = false;

    @ApiModelProperty(value = "通知负责人：json格式")
    private String topicWorker;
}
